/*
 * @Author: chen haoxuan
 * @Date: 2021-05-10 22:14:36
 * @LastEditTime: 2021-05-10 22:23:18
 */
#include<iostream>
using namespace std;
class Student
{
    public:
        Student(int n,int s);
        void display();
        int number;
        int score;
};
Student::Student(int n,int s):number(n),score(s){}
void Student::display()
{
    cout<<number<<endl;
}
int main()
{
    void max(Student *Stud);
    Student stud[5]={
       Student(1001,89),
       Student(1002,90),
       Student(1003,91),
       Student(1004,92),
       Student(1005,93)
    };
    max(stud);
    system("pause");
}
void max(Student *Stud)
{
    int max = Stud[0].score;
    int pos=0; // 记录位置
    for (int i = 1; i < 4; i++)
    {
        if (Stud[i].score>max)
        {
            max=Stud[i].score;
            pos=i;
        }
    }
    Stud[pos].display();
}